<template>
	<view style="width: 100%;">

		<!-- <image src="/static/imgs/bjt.png" style="width: 100%;"></image> -->
		<!-- 
		<view style="width: 100%;height: 150px ; background-color: #0681FF;border-radius: 100% 100% 100% 100% / 0% 0% 50% 50%;"></view> -->
		<view class="bg_arc"></view>
		<view class="gradual">
			<view style="margin-left: 5%; margin-top: 3%; margin-right: 5%;">
				<view style="color: #FFFFFF; font-size: 22px;"><span class="you">{{phone}}</span>代理</view>
				<view style="color: #FFFFFF; font-size: 15px;">到期时间:yyyy-mm-dd (已到期，请充值)</view>
				<view style="width: 100%; color: #FFFFFF;font-size: 15px;margin-top: 13%;margin-bottom: 1.5%;">邀请码：<span
						style="float: right; color: #FFFFFF;margin-right: 5%;">代理QQ群：0000000</span></view>
				<view style="color: #FFFFFF; font-size: 15px; ">{{code}}<span class="code" :data-clipboard-text=code @click="paste(code)" style="color: #FFFFFF;margin-left: 3%; text-decoration:underline">复制</span>
					<view class="capsule_01">提现</view>
					<view class="capsule_02">充值</view>
				</view>
			</view>
		</view>
		<view class="center">
			<view class="center_after" style="text-align: center;">
				<p style="color: #FFFFFF; margin-top: 5%;">￥00.00</p>
				<p style="font-weight: bold; color: #FFFFFF;  letter-spacing:2px ; font-size: 16px;">我的余额</p>
			</view>
			<view class="center_after_left" style="text-align: center;">
				<p style="color: #FFFFFF; margin-top: 5%;">111个</p>
				<p style="font-weight: bold; color: #FFFFFF; font-size: 16px; letter-spacing:2px">我的好友</p>
			</view>
		</view>
		<table class="table" cellpadding="0" cellspacing="0">
			<tr>
				<td class="td_1" @click="recharge">
					<image src="../../static/imgs/tu_01.png" style="width: 35px; height: 35px;"></image>
					<p>会员充值</p>
				</td>
				<td class="td_1">
					<image src="../../static/imgs/tu_02.png" style="width: 35px; height: 35px;"></image>
					<p>推广有奖</p>
				</td>
				<td class="td_2" @click="integral">
					<image src="../../static/imgs/tu_03.png" style="width: 35px; height: 35px;"></image>
					<p>我的积分</p>
				</td>
			</tr>
			<tr>
				<td class="td_1">
					<image src="../../static/imgs/tu_04.png" style="width: 35px; height: 35px;"></image>
					<p>我的卡密</p>
				</td>
				<td class="td_1">
					<image src="../../static/imgs/tu_05.png" style="width: 35px; height: 35px;"></image>
					<p>问题反馈</p>
				</td>
				<td class="td_2" @click="set">
					<image src="../../static/imgs/tu_06.png" style="width: 35px; height: 35px;"></image>
					<p>系统设置</p>
				</td>
			</tr>
			<tr>
				<td class="td_3">
					<image src="../../static/imgs/tu_07.png" style="width: 35px; height: 35px;"></image>
					<p>APP下载</p>
				</td>
				<td class="td_3">
					<image src="../../static/imgs/tu_08.png" style="width: 35px; height: 35px;"></image>
					<p>系统公告</p>
				</td>
				<td>
					<image src="../../static/imgs/tu_09.png" style="width: 35px; height: 35px;"></image>
					<p>退出账户</p>
				</td>
			</tr>
		</table>
	</view>
</template>

<script>
	import Clipboard from 'clipboard'
	

	import {
		MOBILE,
		CODE
	} from '../../constants/index.js'

	export default {
		data() {
			return {
				phone: '',
				code: ''
			}
		},


		mounted: function() {


			this.phone = uni.getStorageSync(MOBILE);
			this.code = uni.getStorageSync(CODE);

		},

		methods: {
			paste(value) {
							uni.setClipboardData({
								data: value,
								fail: function(err) {
									uni.showToast({
										title: '复制失败',
										duration: 2000,
										icon: 'none'
									});
								}
							});
						},

			//会员充值点击事件
			recharge() {
				uni.navigateTo({
					url: '../me/recharge'
				})
			},
			//我的积分点击事件
			integral() {
				uni.navigateTo({
					url: '../me/integral'
				})
			},
			//系统设置点击事件
			set() {
				uni.navigateTo({
					url: '../me/set'
				})
			}
		}
	}
</script>

<style>
	* {
		margin: 0px;
		padding: 0px;
	}

	.you {
		margin-right: 4%;
	}

	.bg_arc {
		width: 100%;
		height: 210px;
		position: relative;
	}

	.bg_arc::after {
		content: '';
		width: 160%;
		height: 200%;
		border-radius: 30%;
		position: absolute;
		left: 20%;
		top: -100%;
		transform: translateX(-50%);
		background: #ffb6c1;
	}

	.gradual {
		position: absolute;
		left: 7.5%;
		top: 6%;
		width: 85%;
		height: 200px;
		border-radius: 5%;
		overflow: auto;
		/* z-index: ; */
		/* background-image: linear-gradient(210deg, rgba(121,139,163,1),rgba(197,212,234,1), rgba(179,193,221,1)); */
		background: rgb(247, 149, 184);
	}

	.center {
		margin: auto;
		margin-top: 15%;
		width: 85%;
		height: 75px;
	}

	.center_after {
		width: 47%;
		height: 75px;
		border-radius: 5%;
		background: #ffb6c1;
		float: left;
	}

	.center_after_left {
		width: 47%;
		height: 75px;
		border-radius: 5%;
		background: #ffb6c1;
		float: right;
	}

	table {
		width: 85%;
		height: 300px;
		margin: auto;
		margin-top: 7%;
		margin-bottom: 20%;
		border-collapse: collapse;
		text-align: center;
		font-size: 16px;
		color: #999999;
	}


	.td_1 {
		border-bottom: 1px solid #ccc;
		border-right: 1px solid #ccc;
	}

	.td_2 {
		border-bottom: 1px solid #ccc;
	}

	.td_3 {
		border-right: 1px solid #ccc;
	}

	.capsule_01 {
		float: right;
		border-radius: 999em;
		background: rgb(194, 134, 152);
		padding-top: 1%;
		padding-bottom: 1%;
		padding-left: 5%;
		padding-right: 5%;
		margin-right: 10%;
	}

	.capsule_02 {
		float: right;
		border-radius: 999em;
		background: rgb(194, 134, 152);
		padding-top: 1%;
		padding-bottom: 1%;
		padding-left: 5%;
		padding-right: 5%;
		margin-right: 5%;
	}
</style>
